package com.naoh.retry.controller;

import com.naoh.retry.service.RemoteService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 * @author yushaojian
 * @date 2018/8/16 16:35
 */

@RestController
public class TestController {
    private final static Logger logger = LoggerFactory.getLogger(TestController.class);

    @Autowired
    private RemoteService remoteService;

    @RequestMapping("/show/{i}")
    public Object show(@PathVariable Integer i){

        String result = remoteService.call(i);
        logger.debug("result : {}", result);

        return "Hello World";
    }
}
